using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace VGS
{
    public partial class LogForm : Form
    {
        private bool dock = true;

        public LogForm()
        {
            InitializeComponent();
        }


        /// <summary>
        /// Gets whether or not the form is docked to its owner
        /// </summary>
        public bool Docked
        {
            get
            {
                return dock;
            }
        }


        /// <summary>
        /// Adds a message to the log form
        /// </summary>
        /// <param name="msg"></param>
        public void AddMessage(string msg)
        {
            listViewLog.Items.Add(msg);
        }


        private void LogForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            // If the owner isn't closing down, then we just hide it
            if (e.CloseReason != CloseReason.FormOwnerClosing)
            {
                e.Cancel = true;
                this.Hide();
            }
        }
    }
}